<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>沃店</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/app.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/index.css">
    <!--必要样式-->
    <style type="text/css">
        body {
            background-color: #fff;
        }

        .order {
            padding: 10px 0;
            margin-top: 10px;
        }

        .userinfo {
            background-color: #3A393E;
        }

        .userinfo img {
            width: 80px;
            height: 80px;
            border-radius: 100px;
            margin: 20px 10px;
        }
    </style>
</head>

<body>
<header data-am-widget="header" class="am-header am-header-default am-header-fixed">
    <div class="am-header-left am-header-nav">
        <a href="${pageContext.request.contextPath}/clientHome/userInfo" class="">
            <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        <a href="#title-link" class="">
            维修订单
        </a>
    </h1>
</header>

<div class="am-g userinfo">
    <div class="am-u-sm-4">
        <img src="${user.avatar}">
    </div>
    <div class="am-u-sm-8" style="padding: 30px 0;">
        <span style="color: #fff;">${user.nickname}</span>
        <br>
        <span style="color: #fff;">${user.phone}</span>
    </div>
</div>
<div id="orderlist">
    <div class="am-g order" v-for="item in items">
        <a :href="'${pageContext.request.contextPath}/clientHallOrder/detail?hallOrderId='+item.id">
            <div class="am-u-sm-3">
                <img src="${pageContext.request.contextPath}/images/1357847b6b52ce1.png" style="">
            </div>
            <div class="am-u-sm-5" style="margin-top: -8px;">
                <span style="font-size: 13px;color:#1C1C1C">{{item.realName}}</span>
                <br>
                <span style="font-size:10px;color:#D7D7D7;"><i class="am-icon-phone"></i>{{item.contractPhone}}</span>
                <br>
                <span style="font-size:10px;color:#D7D7D7;"><i class="am-icon-map-marker"></i>{{item.address}}</span>
                <br>
            </div>
            <div class="am-u-sm-4" style="margin-top: -8px;">
                <span style="font-size: 10px;color:#D7D7D7;float: right;">{{item.createTime}}</span>
                <br>
                <br>
                <img src="${pageContext.request.contextPath}/images/com_new.png" v-if="item.statu == 21" alt=""
                     style="float: right;">
                <img src="${pageContext.request.contextPath}/images/startnew.png" v-if="item.statu == 26" alt=""
                     style="float: right;">
            </div>
        </a>
        <hr class="clearpadding clearmargin am-u-sm-12" style="margin-top: 10px;">
    </div>
</div>

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/amazeui.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/vue.js"></script>
<script type="text/javascript">
    var orderlist = new Vue({
        el: "#orderlist",
        data: {
            items: []
        }
    });
    $.ajax({
        type: "get",
        url: '${pageContext.request.contextPath}/clientHallOrder/findByHandler?orderType=1',
        dataType: 'json',
        success: function (data) {
            if (data.success == true && data.code == 200) {
                orderlist.items = data.obj;
            }
        }

    });
</script>
</body>

</html>
